package com.design.interpreter.football;

/**
 * @author xiemiao
 * @description
 * @date 2023/08/17
 */
public class GestureInterpreter implements Gesture {

    private String expression;

    public GestureInterpreter(String expression) {
        this.expression = expression;
    }

    @Override
    public String interpret() {
        if (expression.equals("attack")) {
            return "进攻";
        } else if (expression.equals("defend")) {
            return "防守";
        }
        return null;
    }
}
